/* GUI CONVERTED from rcrshupb.p (converter v1.75) Sat Aug 12 23:00:52 2000 */
/* rcrshupb.p - Release Management Customer Schedules                   */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*F0PN*/ /*V8:ConvertMode=Maintenance                                   */
/*K1Q4*/ /*V8:RunMode=Character,Windows                                 */
/* REVISION: 7.3    LAST MODIFIED: 08/13/93           BY: WUG *GE19*    */
/* REVISION: 7.3    LAST MODIFIED: 09/11/94           BY: rmh *GM22*    */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98           BY: *K1Q4* Alfred Tan */
/* REVISION: 8.6E   LAST MODIFIED: 01/19/2000         BY: *J3NH* Ashwini G  */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00           BY: *N0KP* myb        */


/* UPDATE REMOTE DATABASE SCHEDULE SUBPROGRAM */

/*J3NH*/ /* REPLACE THE LOGIC OF COPYING THROUGH 'NULL' STREAM BY */
/*J3NH*/ /* BUFFER-COPY STATEMENT                                 */


/*GM22*/ define variable recno as recid.
/*J3NH** define shared frame hf_schd_det.                */
/*J3NH*/ define shared workfile work_schd_det no-undo like schd_det.


/*J3NH** BEGIN DELETE **
 *  form schd_det with frame hf_schd_det.
 *
 * do with frame hf_schd_det.
 * find schd_det
 *           where schd_type = input schd_type
 *           and schd_nbr = input schd_nbr
 *           and schd_line = input schd_line
 *           and schd_rlse_id = input schd_rlse_id
 *           and schd_date = input schd_date
 *           and schd_time = input schd_time
 *           and schd_interval = input schd_interval
 *           and schd_reference = input schd_reference
 *           exclusive no-error.
 *J3NH** END DELETE **/

/*J3NH*/   find first work_schd_det exclusive-lock no-error.
/*J3NH*/   if available work_schd_det then
/*J3NH*/   do:
/*J3NH*/      find schd_det
/*J3NH*/      where schd_det.schd_type      = work_schd_det.schd_type
/*J3NH*/        and schd_det.schd_nbr       = work_schd_det.schd_nbr
/*J3NH*/        and schd_det.schd_line      = work_schd_det.schd_line
/*J3NH*/        and schd_det.schd_rlse_id   = work_schd_det.schd_rlse_id
/*J3NH*/        and schd_det.schd_date      = work_schd_det.schd_date
/*J3NH*/        and schd_det.schd_time      = work_schd_det.schd_time
/*J3NH*/        and schd_det.schd_interval  = work_schd_det.schd_interval
/*J3NH*/        and schd_det.schd_reference = work_schd_det.schd_reference
/*J3NH*/        exclusive-lock no-error.

              if not available schd_det then create schd_det.
/*J3NH**      assign schd_det.                 */
/*J3NH*/      buffer-copy work_schd_det to schd_det.
/*J3NH*/      delete work_schd_det.
/*GM22*/      recno = recid(schd_det).

/*J3NH*/   end.  /* IF AVAILABLE WORK_SCHD_DET */
